let checklogin = () =>{
  let userinfo = wx.getStorageSync('userinfo') ? wx.getStorageSync('userinfo') : ''
  console.log(userinfo)
  return new Promise((resolve,rejected)=>{
    //如果未登录
    if (!userinfo) {
      rejected('用户未登录')
    }else{
      resolve(userinfo)
    }
  })
}


export {
  checklogin
}